# pcb_window.py
from PySide6.QtWidgets import QWidget, QVBoxLayout, QListWidget
from base_window import BaseMainWindow

class PcbWindow(BaseMainWindow):
    def __init__(self, uid, ctrl):
        super().__init__(uid, ctrl)
        central = QWidget()
        self.setCentralWidget(central)
        lay = QVBoxLayout(central)
        self.listw = QListWidget()
        lay.addWidget(self.listw)
        # 模拟器件列表
        for i in range(10):
            self.listw.addItem(f"R{i}")
        self.listw.itemClicked.connect(self._on_click)

    def _on_click(self, item):
        uuid = item.text()
        self.emit_selected(uuid)